﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainingWorkshop.DAL_EF
{
    public class LevelRepository_EF:ILevelRepository_EF
    {
        public List<Models.Level> GetAllLevels()
        {
            List<Level> levelList = new List<Level>();
            using (var projectbEntity = new projectbEntities())
            {
                var level = from levelEntity in projectbEntity.Levels
                            select levelEntity;
                levelList = level.ToList();         
            }
            return Translator.LevelTranslator.TransfertoModelLevel(levelList);
        }
    }
}
